From a64acb0b5dfe9d9fa6f6e3f7e7c034f3b8143585 Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Wed, 14 Jan 2026 18:12:16 +0100
Subject: fix: search not avail during prerender

---
 src/routes/blog/[id=int]/+page.svelte | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/routes/blog/[id=int]/+page.svelte')

diff --git a/src/routes/blog/[id=int]/+page.svelte b/src/routes/blog/[id=int]/+page.svelte
index 574ea76..bb6445c 100644
--- a/src/routes/blog/[id=int]/+page.svelte
+++ b/src/routes/blog/[id=int]/+page.svelte
@@ -7,6 +7,7 @@
   import { page } from '$app/state';
   import { forceTrailingSlash } from '$/lib';
   import Post from '$/lib/blog/Post.svelte';
+  import { building } from '$app/environment';
 
   let { data }: PageProps = $props();
 
@@ -16,7 +17,9 @@
         id: data.post.metadata.id.toString(),
         slug: data.post.metadata.slug,
       }),
-    ) + `${page.url.search}${page.url.hash}`;
+    ) + building
+      ? ''
+      : `${page.url.search}${page.url.hash}`;
 
   onMount(() => {
     tick().then(() => replaceState(route(), page.state));
-- 
cgit v1.2.3

